﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="News.aspx.cs" Inherits="WebTemplate.Web.News.News" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        ul {
            list-style: none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <fieldset>
        <legend>News</legend>
    <div class="newsList">
        <asp:ListView ID="ListView1" runat="server" ItemType="WebTemplate.DAL.Entities.News" ItemPlaceholderID="placeholder"
              OnPagePropertiesChanged="ListView1_PagePropertiesChanged">
            <LayoutTemplate>
                <ul>
                    <li runat="server" id="placeholder"></li>
                </ul>
                <asp:DataPager ID="DataPager1" runat="server" PageSize="4" >
                    <Fields>
                        <asp:NumericPagerField />
                    </Fields>
                </asp:DataPager>
            </LayoutTemplate>
            <ItemTemplate>
                <li>
                    <h3><%# Item.Title %></h3>
                    <asp:Image runat="server"  ImageUrl='<%# Item.ImageUrl %>' Style="vertical-align: middle" />
                    <span style="vertical-align: middle">
                        <%# Item.ShortDescription %>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# string.Format("~/News/NewsDetails.aspx?id={0}",Item.Id) %>'>more...</asp:HyperLink>
                    </span>
                </li>
                <li>
                    <hr />
                </li>

            </ItemTemplate>
        </asp:ListView>
    </div>
             </fieldset>

</asp:Content>
